#ifndef OPTION_HEADER_FLAG
#define OPTION_HEADER_FLAG

// The included directories
#include <stdio.h> 		// Needed before NIDAQmx.h with MinGW
#include "NIDAQmx.h"
#include "mathlink.h"
#include <math.h>
#include <string>
#include <sstream>
#include <map>
#include <vector>
#include<string>
using namespace std;			// bad idea! put in both cpp files? use using declaration in cpp files

class option
{
public:
	option();
	option(const option &);
	~option();
	map<string, vector<int> > NIDAQConstants;
	void loadNIDAQConstants(void);
	map<string,long> L;
										// FIX
//	long getL(string name) {return L.find(name)->second;}		// change to throw exception if name not found seems safer
	long getL(string name) {return L[name];}		// adds value if not found which is probably bad idea
	map<string,double> D;
//	double getD(string name) {return D.find(name)->second;}
	double getD(string name) {return D[name];}
	map<string,string> S;
//	string getS(string name) {return S.find(name)->second;}
	string getS(string name) {return S[name];}
	map<string,double *> DArray;
	map<string,long> DASize;
	double* getDArray(string name) const {return DArray.find(name)->second;} // find is constant member function!
	long	getDASize(string name) const  {return DASize.find(name)->second;} 
	void createarray(string name, long size);
	void fromMathematica(MLINK mlink);
	void getNIDAQConstants(void);
	std::string toString(const char* endline = "\n",const char* tab="\t");
};

void bigerror(void);
option optionsFromString(std::string s); // used in testing



#endif


